Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
98
sale_order_line_input/README.rst
Executable file
98
sale_order_line_input/README.rst
Executable file
@@ -0,0 +1,98 @@
|
||||
.. image:: https://odoo-community.org/readme-banner-image
|
||||
:target: https://odoo-community.org/get-involved?utm_source=readme
|
||||
:alt: Odoo Community Association
|
||||
|
||||
=====================
|
||||
Sale Order Line Input
|
||||
=====================
|
||||
|
||||
..
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:8f03fc6a87b71760074e2ffc2bf44e8e3feb910278cfc3e68e62fc381cc20411
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||
:target: https://odoo-community.org/page/development-status
|
||||
:alt: Beta
|
||||
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/sale-workflow/tree/18.0/sale_order_line_input
|
||||
:alt: OCA/sale-workflow
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sale_order_line_input
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
||||
:target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=18.0
|
||||
:alt: Try me on Runboat
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
This module extends the functionality of sales to allow you to work with
|
||||
sale lines directly.
|
||||
|
||||
It allows you to create sales orders from this sales lines view.
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
To use this module, you need to:
|
||||
|
||||
1. Go to Sales > Orders > Sales Orders Lines
|
||||
2. You can filter, group and switch view type
|
||||
3. Create new line related with existing order
|
||||
4. If order field is empty, a new order will be created
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/issues>`_.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_order_line_input%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Authors
|
||||
-------
|
||||
|
||||
* Tecnativa
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
- `Tecnativa <https://www.tecnativa.com>`__:
|
||||
|
||||
- Carlos Dauden
|
||||
- Carolina Fernandez
|
||||
- Juan José Seguí
|
||||
- Pilar Vargas
|
||||
|
||||
Maintainers
|
||||
-----------
|
||||
|
||||
This module is maintained by the OCA.
|
||||
|
||||
.. image:: https://odoo-community.org/logo.png
|
||||
:alt: Odoo Community Association
|
||||
:target: https://odoo-community.org
|
||||
|
||||
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.
|
||||
|
||||
This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/18.0/sale_order_line_input>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
1
sale_order_line_input/__init__.py
Executable file
1
sale_order_line_input/__init__.py
Executable file
@@ -0,0 +1 @@
|
||||
from . import models
|
||||
15
sale_order_line_input/__manifest__.py
Executable file
15
sale_order_line_input/__manifest__.py
Executable file
@@ -0,0 +1,15 @@
|
||||
# Copyright 2018 Tecnativa - Carlos Dauden
|
||||
# Copyright 2023 Tecnativa - Carolina Fernandez
|
||||
# Copyright 2024 Tecnativa - Juan José Seguí
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
{
|
||||
"name": "Sale Order Line Input",
|
||||
"summary": "Search, create or modify directly sale order lines",
|
||||
"version": "18.0.1.0.0",
|
||||
"category": "Sales",
|
||||
"website": "https://github.com/OCA/sale-workflow",
|
||||
"author": "Tecnativa, Odoo Community Association (OCA)",
|
||||
"license": "AGPL-3",
|
||||
"depends": ["sale_management"],
|
||||
"data": ["views/sale_order_line_view.xml"],
|
||||
}
|
||||
109
sale_order_line_input/i18n/de.po
Executable file
109
sale_order_line_input/i18n/de.po
Executable file
@@ -0,0 +1,109 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * sale_order_line_input
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 12.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: Automatically generated\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Delivered"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Disc.%"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,field_description:sale_order_line_input.field_sale_order_line__force_company_id
|
||||
msgid "Forced company"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,help:sale_order_line_input.field_sale_order_line__pricelist_id
|
||||
msgid "If you change the pricelist, only newly added lines will be affected."
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Invoice Related"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Invoice Status"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Invoiced"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "New"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Not Invoice Related"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Open order"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Order State"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,field_description:sale_order_line_input.field_sale_order_line__pricelist_id
|
||||
msgid "Pricelist"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Product"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model,name:sale_order_line_input.model_sale_order_line
|
||||
msgid "Sales Order Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.actions.act_window,name:sale_order_line_input.action_sales_order_line_input
|
||||
#: model:ir.ui.menu,name:sale_order_line_input.menu_sales_order_line_input
|
||||
msgid "Sales Orders Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,help:sale_order_line_input.field_sale_order_line__force_company_id
|
||||
msgid ""
|
||||
"Technical field to force company or get it from env user if order don't "
|
||||
"exist."
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "UoM"
|
||||
msgstr ""
|
||||
116
sale_order_line_input/i18n/es.po
Executable file
116
sale_order_line_input/i18n/es.po
Executable file
@@ -0,0 +1,116 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * sale_order_line_input
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2018
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 11.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-09-16 13:52+0000\n"
|
||||
"PO-Revision-Date: 2023-07-24 21:09+0000\n"
|
||||
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
|
||||
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 4.17\n"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Delivered"
|
||||
msgstr "Entregado"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Disc.%"
|
||||
msgstr "Desc.%"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,field_description:sale_order_line_input.field_sale_order_line__force_company_id
|
||||
msgid "Forced company"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,help:sale_order_line_input.field_sale_order_line__pricelist_id
|
||||
msgid "If you change the pricelist, only newly added lines will be affected."
|
||||
msgstr ""
|
||||
"Si modifica la lista de precios, sólo se verán afectadas las nuevas líneas "
|
||||
"añadidas."
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Invoice Related"
|
||||
msgstr "Con factura asociada"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Invoice Status"
|
||||
msgstr "Estado factura"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Invoiced"
|
||||
msgstr "Facturado"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "New"
|
||||
msgstr "Nuevo"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Not Invoice Related"
|
||||
msgstr "Sin factura asociada"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Open order"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Order"
|
||||
msgstr "Pedido"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Order State"
|
||||
msgstr "Estado Pedido"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,field_description:sale_order_line_input.field_sale_order_line__pricelist_id
|
||||
msgid "Pricelist"
|
||||
msgstr "Tarifa"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Product"
|
||||
msgstr "Producto"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model,name:sale_order_line_input.model_sale_order_line
|
||||
msgid "Sales Order Line"
|
||||
msgstr "Línea de pedido de venta"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.actions.act_window,name:sale_order_line_input.action_sales_order_line_input
|
||||
#: model:ir.ui.menu,name:sale_order_line_input.menu_sales_order_line_input
|
||||
msgid "Sales Orders Lines"
|
||||
msgstr "Líneas de pedidos"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,help:sale_order_line_input.field_sale_order_line__force_company_id
|
||||
msgid ""
|
||||
"Technical field to force company or get it from env user if order don't "
|
||||
"exist."
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "UoM"
|
||||
msgstr "UdM"
|
||||
114
sale_order_line_input/i18n/it.po
Executable file
114
sale_order_line_input/i18n/it.po
Executable file
@@ -0,0 +1,114 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * sale_order_line_input
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 14.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2024-10-23 18:06+0000\n"
|
||||
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: it\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 5.6.2\n"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Delivered"
|
||||
msgstr "Consegnato"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Disc.%"
|
||||
msgstr "Sconto (%)"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,field_description:sale_order_line_input.field_sale_order_line__force_company_id
|
||||
msgid "Forced company"
|
||||
msgstr "Azienda forzata"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,help:sale_order_line_input.field_sale_order_line__pricelist_id
|
||||
msgid "If you change the pricelist, only newly added lines will be affected."
|
||||
msgstr ""
|
||||
"Se cambi il listino prezzi, verrà applicato solo alle nuove righe aggiunte."
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Invoice Related"
|
||||
msgstr "Collegato a Fattura"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Invoice Status"
|
||||
msgstr "Stato fattura"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Invoiced"
|
||||
msgstr "Fatturato"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "New"
|
||||
msgstr "Nuovo"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Not Invoice Related"
|
||||
msgstr "Non Collegato a Fattura"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Open order"
|
||||
msgstr "Apri ordine"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Order"
|
||||
msgstr "Ordine"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Order State"
|
||||
msgstr "Stato Ordine"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,field_description:sale_order_line_input.field_sale_order_line__pricelist_id
|
||||
msgid "Pricelist"
|
||||
msgstr "Listino prezzi"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Product"
|
||||
msgstr "Prodotto"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model,name:sale_order_line_input.model_sale_order_line
|
||||
msgid "Sales Order Line"
|
||||
msgstr "Riga ordine di vendita"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.actions.act_window,name:sale_order_line_input.action_sales_order_line_input
|
||||
#: model:ir.ui.menu,name:sale_order_line_input.menu_sales_order_line_input
|
||||
msgid "Sales Orders Lines"
|
||||
msgstr "Righe ordini di vendita"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,help:sale_order_line_input.field_sale_order_line__force_company_id
|
||||
msgid ""
|
||||
"Technical field to force company or get it from env user if order don't "
|
||||
"exist."
|
||||
msgstr ""
|
||||
"Campo tecnico per forzare l'azienda o per ricavarla dall'ambiente utente se "
|
||||
"l'ordine non esiste."
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "UoM"
|
||||
msgstr "UdM"
|
||||
133
sale_order_line_input/i18n/sale_order_line_input.pot
Executable file
133
sale_order_line_input/i18n/sale_order_line_input.pot
Executable file
@@ -0,0 +1,133 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * sale_order_line_input
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 18.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Amount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,field_description:sale_order_line_input.field_sale_order_line__company_price_amount
|
||||
msgid "Company Price Amount"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,field_description:sale_order_line_input.field_sale_order_line__company_price_tax_incl_excl
|
||||
msgid "Company Price Tax Incl Excl"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Delivered"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Disc.%"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,field_description:sale_order_line_input.field_sale_order_line__force_company_id
|
||||
msgid "Forced company"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,help:sale_order_line_input.field_sale_order_line__pricelist_id
|
||||
msgid "If you change the pricelist, only newly added lines will be affected."
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Invoice Related"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Invoice Status"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Invoiced"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "New"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Not Invoice Related"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Order State"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,field_description:sale_order_line_input.field_sale_order_line__pricelist_id
|
||||
msgid "Pricelist"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Product"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Product Variant"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model,name:sale_order_line_input.model_sale_order_line
|
||||
msgid "Sales Order Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.actions.act_window,name:sale_order_line_input.action_sales_order_line_input
|
||||
#: model:ir.ui.menu,name:sale_order_line_input.menu_sales_order_line_input
|
||||
msgid "Sales Orders Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,help:sale_order_line_input.field_sale_order_line__force_company_id
|
||||
msgid ""
|
||||
"Technical field to force company or get it from env user if order don't "
|
||||
"exist."
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Total"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Type to find a product..."
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "UoM"
|
||||
msgstr ""
|
||||
113
sale_order_line_input/i18n/tr.po
Executable file
113
sale_order_line_input/i18n/tr.po
Executable file
@@ -0,0 +1,113 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * sale_order_line_input
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 17.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2024-12-24 12:06+0000\n"
|
||||
"Last-Translator: Ömer KÜLAK <omer.kulak@kitayazilim.com>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: tr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 5.6.2\n"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Delivered"
|
||||
msgstr "Teslim Edilen"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Disc.%"
|
||||
msgstr "İnd %"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,field_description:sale_order_line_input.field_sale_order_line__force_company_id
|
||||
msgid "Forced company"
|
||||
msgstr "Şirketi zorla"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,help:sale_order_line_input.field_sale_order_line__pricelist_id
|
||||
msgid "If you change the pricelist, only newly added lines will be affected."
|
||||
msgstr "Fiyat listesi değişirse, yaknızca yeni eklenen satırlar etkilenecek."
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Invoice Related"
|
||||
msgstr "İlişkili Fatura"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Invoice Status"
|
||||
msgstr "Fatura Durumu"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Invoiced"
|
||||
msgstr "Faturalanan"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "New"
|
||||
msgstr "Yeni"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Not Invoice Related"
|
||||
msgstr "İlişkili Fatura Yok"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Open order"
|
||||
msgstr "Şiparişi Göster"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Order"
|
||||
msgstr "Sipariş"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Order State"
|
||||
msgstr "Sipariş Durumu"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,field_description:sale_order_line_input.field_sale_order_line__pricelist_id
|
||||
msgid "Pricelist"
|
||||
msgstr "Fiyat Listesi"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Product"
|
||||
msgstr "Ürün"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model,name:sale_order_line_input.model_sale_order_line
|
||||
msgid "Sales Order Line"
|
||||
msgstr "Sipariş Satırı"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.actions.act_window,name:sale_order_line_input.action_sales_order_line_input
|
||||
#: model:ir.ui.menu,name:sale_order_line_input.menu_sales_order_line_input
|
||||
msgid "Sales Orders Lines"
|
||||
msgstr "Sipariş Satırları"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,help:sale_order_line_input.field_sale_order_line__force_company_id
|
||||
msgid ""
|
||||
"Technical field to force company or get it from env user if order don't "
|
||||
"exist."
|
||||
msgstr ""
|
||||
"Sipariş yoksa şirketi zorlamak veya çevre kullanıcısından almak için teknik "
|
||||
"alan."
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "UoM"
|
||||
msgstr "Birim"
|
||||
111
sale_order_line_input/i18n/zh_CN.po
Executable file
111
sale_order_line_input/i18n/zh_CN.po
Executable file
@@ -0,0 +1,111 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * sale_order_line_input
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 12.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2019-09-01 11:23+0000\n"
|
||||
"Last-Translator: 黎伟杰 <674416404@qq.com>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: zh_CN\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Weblate 3.8\n"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Delivered"
|
||||
msgstr "已送货"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Disc.%"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,field_description:sale_order_line_input.field_sale_order_line__force_company_id
|
||||
msgid "Forced company"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,help:sale_order_line_input.field_sale_order_line__pricelist_id
|
||||
msgid "If you change the pricelist, only newly added lines will be affected."
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Invoice Related"
|
||||
msgstr "发票相关"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Invoice Status"
|
||||
msgstr "发票状态"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Invoiced"
|
||||
msgstr "已开票"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "New"
|
||||
msgstr "新建"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Not Invoice Related"
|
||||
msgstr "与发票无关"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Open order"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Order"
|
||||
msgstr "订单"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
msgid "Order State"
|
||||
msgstr "订单状态"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,field_description:sale_order_line_input.field_sale_order_line__pricelist_id
|
||||
msgid "Pricelist"
|
||||
msgstr "价格表"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "Product"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model,name:sale_order_line_input.model_sale_order_line
|
||||
msgid "Sales Order Line"
|
||||
msgstr "销售订单行"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.actions.act_window,name:sale_order_line_input.action_sales_order_line_input
|
||||
#: model:ir.ui.menu,name:sale_order_line_input.menu_sales_order_line_input
|
||||
msgid "Sales Orders Lines"
|
||||
msgstr "销售订单行"
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model:ir.model.fields,help:sale_order_line_input.field_sale_order_line__force_company_id
|
||||
msgid ""
|
||||
"Technical field to force company or get it from env user if order don't "
|
||||
"exist."
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_order_line_input
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
|
||||
#: model_terms:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
|
||||
msgid "UoM"
|
||||
msgstr "计量单位"
|
||||
1
sale_order_line_input/models/__init__.py
Executable file
1
sale_order_line_input/models/__init__.py
Executable file
@@ -0,0 +1 @@
|
||||
from . import sale_order
|
||||
73
sale_order_line_input/models/sale_order.py
Executable file
73
sale_order_line_input/models/sale_order.py
Executable file
@@ -0,0 +1,73 @@
|
||||
# Copyright 2018 Tecnativa - Carlos Dauden
|
||||
# Copyright 2023 Tecnativa - Carolina Fernandez
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class SaleOrderLine(models.Model):
|
||||
_inherit = "sale.order.line"
|
||||
|
||||
pricelist_id = fields.Many2one(related="order_id.pricelist_id")
|
||||
force_company_id = fields.Many2one(
|
||||
comodel_name="res.company",
|
||||
string="Forced company",
|
||||
compute="_compute_force_company_id",
|
||||
readonly=False,
|
||||
help="Technical field to force company or get it "
|
||||
"from env user if order don't exist.",
|
||||
)
|
||||
company_price_amount = fields.Monetary(compute="_compute_company_price_amount")
|
||||
company_price_tax_incl_excl = fields.Monetary(
|
||||
compute="_compute_company_price_tax_incl_excl"
|
||||
)
|
||||
|
||||
@api.depends("order_id")
|
||||
def _compute_force_company_id(self):
|
||||
"""Related company is not computed already when we click create new line"""
|
||||
for line in self:
|
||||
line.force_company_id = line.order_id.company_id or self.env.company
|
||||
|
||||
@api.depends("force_company_id", "price_total", "price_subtotal")
|
||||
def _compute_company_price_amount(self):
|
||||
for line in self:
|
||||
if line.force_company_id.account_price_include == "tax_included":
|
||||
line.company_price_amount = line.price_total
|
||||
else:
|
||||
line.company_price_amount = line.price_subtotal
|
||||
|
||||
@api.depends("force_company_id", "price_total", "price_subtotal")
|
||||
def _compute_company_price_tax_incl_excl(self):
|
||||
for line in self:
|
||||
if line.force_company_id.account_price_include == "tax_included":
|
||||
line.company_price_tax_incl_excl = line.price_subtotal
|
||||
else:
|
||||
line.company_price_tax_incl_excl = line.price_total
|
||||
|
||||
def _compute_name(self):
|
||||
# A NewId is needed to set the product for the parent method to set
|
||||
# the language correctly. Empty id leads to error in ‘_get_lang’.
|
||||
for line in self:
|
||||
if not line.order_id and line.product_id:
|
||||
SaleOrder = self.env["sale.order"]
|
||||
line.order_id = SaleOrder.new({})
|
||||
return super()._compute_name()
|
||||
|
||||
@api.onchange("force_company_id")
|
||||
def _onchange_force_company_id(self):
|
||||
"""Assign company_id because is used in domains as partner,
|
||||
product, taxes..."""
|
||||
for line in self:
|
||||
line.company_id = line.force_company_id
|
||||
|
||||
@api.onchange("order_partner_id")
|
||||
def _onchange_order_partner_id(self):
|
||||
"""Create order to correct compute of taxes"""
|
||||
if not self.order_partner_id or self.order_id:
|
||||
return
|
||||
SaleOrder = self.env["sale.order"]
|
||||
new_so = SaleOrder.new({"partner_id": self.order_partner_id})
|
||||
for onchange_method in new_so._onchange_methods["partner_id"]:
|
||||
onchange_method(new_so)
|
||||
order_vals = new_so._convert_to_write(new_so._cache)
|
||||
self.order_id = SaleOrder.create(order_vals)
|
||||
3
sale_order_line_input/pyproject.toml
Executable file
3
sale_order_line_input/pyproject.toml
Executable file
@@ -0,0 +1,3 @@
|
||||
[build-system]
|
||||
requires = ["whool"]
|
||||
build-backend = "whool.buildapi"
|
||||
5
sale_order_line_input/readme/CONTRIBUTORS.md
Executable file
5
sale_order_line_input/readme/CONTRIBUTORS.md
Executable file
@@ -0,0 +1,5 @@
|
||||
- [Tecnativa](https://www.tecnativa.com):
|
||||
- Carlos Dauden
|
||||
- Carolina Fernandez
|
||||
- Juan José Seguí
|
||||
- Pilar Vargas
|
||||
4
sale_order_line_input/readme/DESCRIPTION.md
Executable file
4
sale_order_line_input/readme/DESCRIPTION.md
Executable file
@@ -0,0 +1,4 @@
|
||||
This module extends the functionality of sales to allow you to work with
|
||||
sale lines directly.
|
||||
|
||||
It allows you to create sales orders from this sales lines view.
|
||||
6
sale_order_line_input/readme/USAGE.md
Executable file
6
sale_order_line_input/readme/USAGE.md
Executable file
@@ -0,0 +1,6 @@
|
||||
To use this module, you need to:
|
||||
|
||||
1. Go to Sales \> Orders \> Sales Orders Lines
|
||||
2. You can filter, group and switch view type
|
||||
3. Create new line related with existing order
|
||||
4. If order field is empty, a new order will be created
|
||||
BIN
sale_order_line_input/static/description/icon.png
Executable file
BIN
sale_order_line_input/static/description/icon.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
448
sale_order_line_input/static/description/index.html
Executable file
448
sale_order_line_input/static/description/index.html
Executable file
@@ -0,0 +1,448 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
||||
<title>README.rst</title>
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
Despite the name, some widely supported CSS2 features are used.
|
||||
|
||||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* used to remove borders from tables and images */
|
||||
.borderless, table.borderless td, table.borderless th {
|
||||
border: 0 }
|
||||
|
||||
table.borderless td, table.borderless th {
|
||||
/* Override padding for "table.docutils td" with "! important".
|
||||
The right padding separates the table cells. */
|
||||
padding: 0 0.5em 0 0 ! important }
|
||||
|
||||
.first {
|
||||
/* Override more specific margin styles with "! important". */
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
.subscript {
|
||||
vertical-align: sub;
|
||||
font-size: smaller }
|
||||
|
||||
.superscript {
|
||||
vertical-align: super;
|
||||
font-size: smaller }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title, .code .error {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin: 0 0 0.5em 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
||||
clear: left ;
|
||||
float: left ;
|
||||
margin-right: 1em }
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
||||
clear: right ;
|
||||
float: right ;
|
||||
margin-left: 1em }
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.align-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left }
|
||||
|
||||
.align-center {
|
||||
clear: both ;
|
||||
text-align: center }
|
||||
|
||||
.align-right {
|
||||
text-align: right }
|
||||
|
||||
/* reset inner alignment in figures */
|
||||
div.align-right {
|
||||
text-align: inherit }
|
||||
|
||||
/* div.align-center * { */
|
||||
/* text-align: left } */
|
||||
|
||||
.align-top {
|
||||
vertical-align: top }
|
||||
|
||||
.align-middle {
|
||||
vertical-align: middle }
|
||||
|
||||
.align-bottom {
|
||||
vertical-align: bottom }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font: inherit }
|
||||
|
||||
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: gray; } /* line numbers */
|
||||
pre.code, code { background-color: #eeeeee }
|
||||
pre.code .comment, code .comment { color: #5C6576 }
|
||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
||||
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
||||
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
||||
pre.code .inserted, code .inserted { background-color: #A3D289}
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic, pre.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid 1px black;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
/* "booktabs" style (no vertical lines) */
|
||||
table.docutils.booktabs {
|
||||
border: 0px;
|
||||
border-top: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table.docutils.booktabs * {
|
||||
border: 0px;
|
||||
}
|
||||
table.docutils.booktabs th {
|
||||
border-bottom: thin solid;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document">
|
||||
|
||||
|
||||
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
|
||||
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
|
||||
</a>
|
||||
<div class="section" id="sale-order-line-input">
|
||||
<h1>Sale Order Line Input</h1>
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:8f03fc6a87b71760074e2ffc2bf44e8e3feb910278cfc3e68e62fc381cc20411
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/sale-workflow/tree/18.0/sale_order_line_input"><img alt="OCA/sale-workflow" src="https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sale_order_line_input"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module extends the functionality of sales to allow you to work with
|
||||
sale lines directly.</p>
|
||||
<p>It allows you to create sales orders from this sales lines view.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a></li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
|
||||
<p>To use this module, you need to:</p>
|
||||
<ol class="arabic simple">
|
||||
<li>Go to Sales > Orders > Sales Orders Lines</li>
|
||||
<li>You can filter, group and switch view type</li>
|
||||
<li>Create new line related with existing order</li>
|
||||
<li>If order field is empty, a new order will be created</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h2><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h2>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/sale-workflow/issues">GitHub Issues</a>.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||
<a class="reference external" href="https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_order_line_input%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
<h2><a class="toc-backref" href="#toc-entry-3">Credits</a></h2>
|
||||
<div class="section" id="authors">
|
||||
<h3><a class="toc-backref" href="#toc-entry-4">Authors</a></h3>
|
||||
<ul class="simple">
|
||||
<li>Tecnativa</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
|
||||
<ul class="simple">
|
||||
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
|
||||
<li>Carlos Dauden</li>
|
||||
<li>Carolina Fernandez</li>
|
||||
<li>Juan José Seguí</li>
|
||||
<li>Pilar Vargas</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h3><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h3>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org">
|
||||
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
||||
</a>
|
||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/sale-workflow/tree/18.0/sale_order_line_input">OCA/sale-workflow</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1
sale_order_line_input/tests/__init__.py
Executable file
1
sale_order_line_input/tests/__init__.py
Executable file
@@ -0,0 +1 @@
|
||||
from . import test_sale_order_line_input
|
||||
76
sale_order_line_input/tests/test_sale_order_line_input.py
Executable file
76
sale_order_line_input/tests/test_sale_order_line_input.py
Executable file
@@ -0,0 +1,76 @@
|
||||
# Copyright 2018 Tecnativa - Carlos Dauden
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo.tests import Form
|
||||
|
||||
from odoo.addons.base.tests.common import BaseCommon
|
||||
|
||||
|
||||
class TestSaleOrderLineInput(BaseCommon):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.partner = cls.env["res.partner"].create({"name": "Test"})
|
||||
cls.partner_2 = cls.env["res.partner"].create({"name": "Test 2"})
|
||||
cls.product = cls.env["product.product"].create(
|
||||
{"name": "test_product", "type": "service"}
|
||||
)
|
||||
cls.uom_unit = cls.env.ref("uom.product_uom_unit")
|
||||
|
||||
def test_sale_order_create_and_show(self):
|
||||
sale_order_form = Form(self.env["sale.order"])
|
||||
sale_order_form.partner_id = self.partner
|
||||
sale_order = sale_order_form.save()
|
||||
line_form = Form(
|
||||
self.env["sale.order.line"],
|
||||
view="sale_order_line_input.view_sales_order_line_input_tree",
|
||||
)
|
||||
line_form.order_id = sale_order
|
||||
line_form.product_id = self.product
|
||||
line_form.price_unit = 190.50
|
||||
line_form.product_uom = self.uom_unit
|
||||
line_form.product_uom_qty = 8.0
|
||||
line_form.name = "Test line description"
|
||||
line = line_form.save()
|
||||
self.assertTrue(line.order_id)
|
||||
new_sale_order_line = self.env["sale.order.line"].new(
|
||||
{
|
||||
"product_id": self.product.id,
|
||||
"product_uom_qty": 1.0,
|
||||
"product_uom": self.uom_unit.id,
|
||||
"name": "New Test Sale Order Line",
|
||||
}
|
||||
)
|
||||
new_sale_order_line.order_partner_id = self.partner_2
|
||||
new_sale_order_line._onchange_order_partner_id()
|
||||
order_vals = new_sale_order_line._convert_to_write(new_sale_order_line._cache)
|
||||
new_sale_order_line = self.env["sale.order.line"].create(order_vals)
|
||||
self.assertIsNotNone(new_sale_order_line.order_id)
|
||||
self.assertEqual(new_sale_order_line.order_id.partner_id, self.partner_2)
|
||||
existing_order_id = new_sale_order_line.order_id.id
|
||||
new_sale_order_line._onchange_order_partner_id()
|
||||
self.assertEqual(new_sale_order_line.order_id.id, existing_order_id)
|
||||
self.assertEqual(new_sale_order_line.order_id.partner_id, self.partner_2)
|
||||
|
||||
def test_compute_name(self):
|
||||
"""Test `_compute_name` computes name correctly"""
|
||||
sale_order = self.env["sale.order"].create({"partner_id": self.partner.id})
|
||||
line = self.env["sale.order.line"].create(
|
||||
{
|
||||
"product_id": self.product.id,
|
||||
"product_uom_qty": 1.0,
|
||||
"price_unit": 50.0,
|
||||
"name": "",
|
||||
"order_id": sale_order.id,
|
||||
}
|
||||
)
|
||||
line._compute_name()
|
||||
self.assertEqual(line.order_id, sale_order, "Order ID should be set correctly")
|
||||
self.assertIsNotNone(
|
||||
line.order_id.partner_id, "Partner ID should be set correctly"
|
||||
)
|
||||
self.assertEqual(
|
||||
line.order_id.partner_id,
|
||||
self.partner,
|
||||
"Order ID should be assigned correctly",
|
||||
)
|
||||
253
sale_order_line_input/views/sale_order_line_view.xml
Executable file
253
sale_order_line_input/views/sale_order_line_view.xml
Executable file
@@ -0,0 +1,253 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!-- Copyright 2018 Tecnativa - Carlos Dauden
|
||||
Copyright 2023 Tecnativa - Carolina Fernandez
|
||||
Copyright 2024 Tecnativa - Juan José Seguí
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="view_sales_order_line_input_tree" model="ir.ui.view">
|
||||
<field name="name">sale.order.line.input.list.view</field>
|
||||
<field name="model">sale.order.line</field>
|
||||
<field name="priority">20</field>
|
||||
<field name="arch" type="xml">
|
||||
<list
|
||||
decoration-info="invoice_status == 'to invoice'"
|
||||
decoration-warning="state == 'draft'"
|
||||
decoration-muted="state == 'cancel'"
|
||||
decoration-success="invoice_status == 'invoiced'"
|
||||
editable="top"
|
||||
create="true"
|
||||
>
|
||||
<!-- We do not display the type because we don't want the user to be bothered with
|
||||
that information if he has no section or note. -->
|
||||
<field
|
||||
name="force_company_id"
|
||||
optional="hide"
|
||||
readonly="order_id"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
<field
|
||||
name="order_id"
|
||||
string="Order"
|
||||
required="0"
|
||||
placeholder="New"
|
||||
readonly="order_id"
|
||||
domain="[('state', '!=', 'cancel'),('company_id', '=', company_id)]"
|
||||
force_save="1"
|
||||
options='{"no_create": True}'
|
||||
/>
|
||||
<field
|
||||
name="order_partner_id"
|
||||
context="{'res_partner_search_mode': 'customer', 'default_is_company': True, 'default_customer_rank': 1}"
|
||||
options='{"always_reload": True}'
|
||||
required="1"
|
||||
readonly="order_partner_id and order_id"
|
||||
/>
|
||||
<field name="write_date" widget="date" optional="hide" />
|
||||
<!-- The product_id field does not have optional="hide" and widget="sol_product_many2one" intentionally because it is not compatible outside the sales order form view.. !-->
|
||||
<field
|
||||
name="product_id"
|
||||
string="Product Variant"
|
||||
readonly="not product_updatable"
|
||||
required="not display_type and not is_downpayment"
|
||||
force_save="1"
|
||||
context="{
|
||||
'partner_id': order_partner_id,
|
||||
'quantity': product_uom_qty,
|
||||
'pricelist': pricelist_id,
|
||||
'uom':product_uom,
|
||||
'company_id': company_id,
|
||||
'default_lst_price': price_unit,
|
||||
'default_uom_id': product_uom,
|
||||
}"
|
||||
options="{
|
||||
'no_open': True,
|
||||
}"
|
||||
domain="[('sale_ok', '=', True)]"
|
||||
/>
|
||||
<!-- The product_template_id field has column_invisible=1 intentionally because it is not compatible outside the sales order form view. !-->
|
||||
<field
|
||||
name="product_template_id"
|
||||
string="Product"
|
||||
readonly="id and not product_updatable"
|
||||
required="not display_type and not is_downpayment"
|
||||
context="{
|
||||
'partner_id': order_partner_id,
|
||||
'quantity': product_uom_qty,
|
||||
'pricelist': pricelist_id,
|
||||
'uom':product_uom,
|
||||
'company_id': company_id,
|
||||
'default_list_price': price_unit,
|
||||
'default_uom_id': product_uom,
|
||||
}"
|
||||
options="{
|
||||
'no_open': True,
|
||||
}"
|
||||
optional="show"
|
||||
domain="[('sale_ok', '=', True)]"
|
||||
widget="sol_product_many2one"
|
||||
column_invisible="True"
|
||||
placeholder="Type to find a product..."
|
||||
/>
|
||||
<field name="name" widget="sol_text" optional="show" />
|
||||
<field
|
||||
name="analytic_distribution"
|
||||
widget="analytic_distribution"
|
||||
optional="hide"
|
||||
groups="analytic.group_analytic_accounting"
|
||||
options="{'product_field': 'product_id', 'business_domain': 'sale_order', 'amount_field': 'price_subtotal'}"
|
||||
/>
|
||||
<field
|
||||
name="product_uom_qty"
|
||||
decoration-info="(not display_type and invoice_status == 'to invoice')"
|
||||
decoration-bf="(not display_type and invoice_status == 'to invoice')"
|
||||
context="{
|
||||
'partner_id': order_partner_id,
|
||||
'quantity': product_uom_qty,
|
||||
'pricelist': pricelist_id,
|
||||
'uom': product_uom,
|
||||
'company_id': company_id
|
||||
}"
|
||||
readonly="is_downpayment"
|
||||
/>
|
||||
<field
|
||||
name="qty_delivered"
|
||||
decoration-info="(not display_type and invoice_status == 'to invoice')"
|
||||
decoration-bf="(not display_type and invoice_status == 'to invoice')"
|
||||
string="Delivered"
|
||||
invisible="state != 'sale'"
|
||||
readonly="qty_delivered_method != 'manual' or is_downpayment"
|
||||
optional="show"
|
||||
/>
|
||||
<field
|
||||
name="qty_invoiced"
|
||||
decoration-info="(not display_type and invoice_status == 'to invoice')"
|
||||
decoration-bf="(not display_type and invoice_status == 'to invoice')"
|
||||
string="Invoiced"
|
||||
invisible="state != 'sale'"
|
||||
optional="show"
|
||||
/>
|
||||
<field name="product_uom" column_invisible="1" />
|
||||
<field
|
||||
name="product_uom"
|
||||
force_save="1"
|
||||
string="UoM"
|
||||
readonly="product_uom_readonly"
|
||||
required="not display_type and not is_downpayment"
|
||||
context="{'company_id': company_id}"
|
||||
groups="uom.group_uom"
|
||||
options='{"no_open": True}'
|
||||
width="60px"
|
||||
optional="show"
|
||||
/>
|
||||
<field
|
||||
name="customer_lead"
|
||||
optional="hide"
|
||||
width="80px"
|
||||
readonly="state not in ['draft', 'sent', 'sale'] or is_downpayment"
|
||||
/>
|
||||
<field
|
||||
name="product_packaging_qty"
|
||||
invisible="not product_id or not product_packaging_id"
|
||||
groups="product.group_stock_packaging"
|
||||
optional="show"
|
||||
/>
|
||||
<field
|
||||
name="product_packaging_id"
|
||||
invisible="not product_id"
|
||||
context="{'default_product_id': product_id, 'list_view_ref':'product.product_packaging_tree_view', 'form_view_ref':'product.product_packaging_form_view'}"
|
||||
groups="product.group_stock_packaging"
|
||||
optional="show"
|
||||
/>
|
||||
<field name="price_unit" readonly="qty_invoiced > 0" />
|
||||
<field
|
||||
name="tax_id"
|
||||
widget="many2many_tags"
|
||||
options="{'no_create': True}"
|
||||
domain="[('type_tax_use', '=', 'sale'), ('company_id', 'parent_of', company_id), ('country_id', '=', tax_country_id)]"
|
||||
context="{'active_test': True}"
|
||||
readonly="qty_invoiced > 0 or is_downpayment"
|
||||
optional="show"
|
||||
/>
|
||||
<field
|
||||
name="discount"
|
||||
string="Disc.%"
|
||||
groups="sale.group_discount_per_so_line"
|
||||
width="50px"
|
||||
optional="show"
|
||||
/>
|
||||
<!-- There are 2 "Amount" fields (price_subtotal + price_total), and they are shown according to the option defined in the company in the account_price_include field, we don't want to show always 2 columns and only 1 has the right data, therefore, the new company_price_amount field reflects the right data of each row. !-->
|
||||
<field
|
||||
name="company_price_amount"
|
||||
invisible="is_downpayment"
|
||||
string="Amount"
|
||||
/>
|
||||
<!-- Optional amounts -->
|
||||
<!-- There are 2 "similar" fields (price_total + price_subtotal), and they are shown according to the option defined in the company in the account_price_include field, we don't want to show always 2 columns and only 1 has the right data, therefore, the new company_price_tax_incl_excl field reflects the right data of each row. !-->
|
||||
<field
|
||||
name="company_price_tax_incl_excl"
|
||||
optional="hide"
|
||||
invisible="is_downpayment"
|
||||
string="Total"
|
||||
/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_sales_order_line_filter" model="ir.ui.view">
|
||||
<field name="model">sale.order.line</field>
|
||||
<field name="inherit_id" ref="sale.view_sales_order_line_filter" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='salesman_id']" position="after">
|
||||
<field name="name" />
|
||||
<field name="product_uom" groups="uom.group_uom" />
|
||||
<field
|
||||
name="analytic_distribution"
|
||||
groups="analytic.group_analytic_accounting"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
name="not_invoice_related"
|
||||
string="Not Invoice Related"
|
||||
domain="[('invoice_lines', '=', False)]"
|
||||
/>
|
||||
<filter
|
||||
name="invoice_related"
|
||||
string="Invoice Related"
|
||||
domain="[('invoice_lines', '!=', False)]"
|
||||
context="{'tax_hide': True}"
|
||||
/>
|
||||
</xpath>
|
||||
<xpath expr="//filter[@name='product']/.." position="inside">
|
||||
<filter
|
||||
name="order_state"
|
||||
string="Order State"
|
||||
context="{'group_by': 'state'}"
|
||||
/>
|
||||
<filter
|
||||
name="invoice_status"
|
||||
string="Invoice Status"
|
||||
context="{'group_by': 'invoice_status'}"
|
||||
/>
|
||||
<filter
|
||||
name="uom_filter"
|
||||
string="UoM"
|
||||
context="{'group_by': 'product_uom'}"
|
||||
groups="uom.group_uom"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_sales_order_line_input" model="ir.actions.act_window">
|
||||
<field name="name">Sales Orders Lines</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">sale.order.line</field>
|
||||
<field name="view_mode">list,form,pivot,graph</field>
|
||||
<field name="view_id" ref="view_sales_order_line_input_tree" />
|
||||
</record>
|
||||
<menuitem
|
||||
id="menu_sales_order_line_input"
|
||||
action="action_sales_order_line_input"
|
||||
parent="sale.sale_order_menu"
|
||||
groups="sales_team.group_sale_salesman"
|
||||
sequence="30"
|
||||
/>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user