Skip to content

Commit c314c82

Browse files
carlosdaudenpedrobaeza
authored andcommitted
[ADD] sale_order_line_input: New module
[UPD] README.rst [UPD] Update sale_order_line_input.pot
1 parent 579fa3f commit c314c82

15 files changed

+938
-0
lines changed

sale_order_line_input/README.rst

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
=====================
2+
Sale Order Line Input
3+
=====================
4+
5+
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6+
!! This file is generated by oca-gen-addon-readme !!
7+
!! changes will be overwritten. !!
8+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9+
10+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
11+
:target: https://odoo-community.org/page/development-status
12+
:alt: Beta
13+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
14+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
15+
:alt: License: AGPL-3
16+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github
17+
:target: https://github.com/OCA/sale-workflow/tree/11.0/sale_order_line_input
18+
:alt: OCA/sale-workflow
19+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
20+
:target: https://translation.odoo-community.org/projects/sale-workflow-11-0/sale-workflow-11-0-sale_order_line_input
21+
:alt: Translate me on Weblate
22+
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23+
:target: https://runbot.odoo-community.org/runbot/167/11.0
24+
:alt: Try me on Runbot
25+
26+
|badge1| |badge2| |badge3| |badge4| |badge5|
27+
28+
This module extends the functionality of sales to allow you to work with
29+
sale lines directly.
30+
31+
It allows you to create sales orders from this sales lines view.
32+
33+
**Table of contents**
34+
35+
.. contents::
36+
:local:
37+
38+
Usage
39+
=====
40+
41+
To use this module, you need to:
42+
43+
#. Go to Sales > Orders > Sales Orders Lines
44+
#. You can filter, group and switch view type
45+
#. Create new line related with existant order
46+
#. If order field is empty, a new order will be created
47+
48+
Bug Tracker
49+
===========
50+
51+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/issues>`_.
52+
In case of trouble, please check there if your issue has already been reported.
53+
If you spotted it first, help us smashing it by providing a detailed and welcomed
54+
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_order_line_input%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
55+
56+
Do not contact contributors directly about support or help with technical issues.
57+
58+
Credits
59+
=======
60+
61+
Authors
62+
~~~~~~~
63+
64+
* Tecnativa
65+
66+
Contributors
67+
~~~~~~~~~~~~
68+
69+
* `Tecnativa <https://www.tecnativa.com>`_:
70+
71+
* Carlos Dauden
72+
73+
Maintainers
74+
~~~~~~~~~~~
75+
76+
This module is maintained by the OCA.
77+
78+
.. image:: https://odoo-community.org/logo.png
79+
:alt: Odoo Community Association
80+
:target: https://odoo-community.org
81+
82+
OCA, or the Odoo Community Association, is a nonprofit organization whose
83+
mission is to support the collaborative development of Odoo features and
84+
promote its widespread use.
85+
86+
This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/11.0/sale_order_line_input>`_ project on GitHub.
87+
88+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

sale_order_line_input/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models

sale_order_line_input/__manifest__.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2018 Tecnativa - Carlos Dauden
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
{
4+
'name': 'Sale Order Line Input',
5+
'summary': 'Search, create or modify directly sale order lines',
6+
'version': '11.0.1.0.0',
7+
'development_status': 'Beta',
8+
'category': 'Sales',
9+
'website': 'https://github.com/OCA/sale-workflow',
10+
'author': 'Tecnativa, Odoo Community Association (OCA)',
11+
'license': 'AGPL-3',
12+
'installable': True,
13+
'depends': [
14+
'sale',
15+
],
16+
'data': [
17+
'views/sale_order_line_view.xml',
18+
],
19+
}

sale_order_line_input/i18n/es.po

+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * sale_order_line_input
4+
#
5+
# Translators:
6+
# OCA Transbot <transbot@odoo-community.org>, 2018
7+
msgid ""
8+
msgstr ""
9+
"Project-Id-Version: Odoo Server 11.0\n"
10+
"Report-Msgid-Bugs-To: \n"
11+
"POT-Creation-Date: 2018-06-05 17:43+0200\n"
12+
"PO-Revision-Date: 2018-06-05 17:44+0200\n"
13+
"Last-Translator: Carlos Dauden <carlos.dauden@tecnativa.com>\n"
14+
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
15+
"Language: es\n"
16+
"MIME-Version: 1.0\n"
17+
"Content-Type: text/plain; charset=UTF-8\n"
18+
"Content-Transfer-Encoding: 8bit\n"
19+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
20+
"X-Generator: Poedit 1.8.7.1\n"
21+
22+
#. module: sale_order_line_input
23+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
24+
msgid "Delivered"
25+
msgstr "Entregado"
26+
27+
#. module: sale_order_line_input
28+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
29+
msgid "Invoice Related"
30+
msgstr "Con factura asociada"
31+
32+
#. module: sale_order_line_input
33+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
34+
msgid "Invoice Status"
35+
msgstr "Estado factura"
36+
37+
#. module: sale_order_line_input
38+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
39+
msgid "Invoiced"
40+
msgstr "Facturado"
41+
42+
#. module: sale_order_line_input
43+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
44+
msgid "New"
45+
msgstr "Nuevo"
46+
47+
#. module: sale_order_line_input
48+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
49+
msgid "Not Invoice Related"
50+
msgstr "Sin factura asociada"
51+
52+
#. module: sale_order_line_input
53+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
54+
msgid "Order"
55+
msgstr "Pedido"
56+
57+
#. module: sale_order_line_input
58+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
59+
msgid "Order State"
60+
msgstr "Estado Pedido"
61+
62+
#. module: sale_order_line_input
63+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
64+
msgid "Ordered"
65+
msgstr "Pedido"
66+
67+
#. module: sale_order_line_input
68+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
69+
msgid "Ordered Qty"
70+
msgstr "Ctdad pedida"
71+
72+
#. module: sale_order_line_input
73+
#: model:ir.model.fields,field_description:sale_order_line_input.field_sale_order_line_pricelist_id
74+
msgid "Pricelist"
75+
msgstr "Tarifa"
76+
77+
#. module: sale_order_line_input
78+
#: model:ir.model.fields,help:sale_order_line_input.field_sale_order_line_pricelist_id
79+
msgid "Pricelist for current sales order."
80+
msgstr "Tarifa para el pedido de venta actual."
81+
82+
#. module: sale_order_line_input
83+
#: model:ir.model,name:sale_order_line_input.model_sale_order_line
84+
msgid "Sales Order Line"
85+
msgstr "Línea de pedido de venta"
86+
87+
#. module: sale_order_line_input
88+
#: model:ir.actions.act_window,name:sale_order_line_input.action_sales_order_line_input
89+
#: model:ir.ui.menu,name:sale_order_line_input.menu_sales_order_line_input
90+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
91+
msgid "Sales Orders Lines"
92+
msgstr "Líneas de pedidos"
93+
94+
#. module: sale_order_line_input
95+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
96+
msgid "To Invoice"
97+
msgstr "A facturar"
98+
99+
#. module: sale_order_line_input
100+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
101+
msgid "Total"
102+
msgstr "Total"
103+
104+
#. module: sale_order_line_input
105+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
106+
msgid "UoM"
107+
msgstr "UdM"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * sale_order_line_input
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 11.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: <>\n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
#. module: sale_order_line_input
17+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
18+
msgid "Delivered"
19+
msgstr ""
20+
21+
#. module: sale_order_line_input
22+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
23+
msgid "Invoice Related"
24+
msgstr ""
25+
26+
#. module: sale_order_line_input
27+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
28+
msgid "Invoice Status"
29+
msgstr ""
30+
31+
#. module: sale_order_line_input
32+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
33+
msgid "Invoiced"
34+
msgstr ""
35+
36+
#. module: sale_order_line_input
37+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
38+
msgid "New"
39+
msgstr ""
40+
41+
#. module: sale_order_line_input
42+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
43+
msgid "Not Invoice Related"
44+
msgstr ""
45+
46+
#. module: sale_order_line_input
47+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
48+
msgid "Order"
49+
msgstr ""
50+
51+
#. module: sale_order_line_input
52+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
53+
msgid "Order State"
54+
msgstr ""
55+
56+
#. module: sale_order_line_input
57+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
58+
msgid "Ordered"
59+
msgstr ""
60+
61+
#. module: sale_order_line_input
62+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
63+
msgid "Ordered Qty"
64+
msgstr ""
65+
66+
#. module: sale_order_line_input
67+
#: model:ir.model.fields,field_description:sale_order_line_input.field_sale_order_line_pricelist_id
68+
msgid "Pricelist"
69+
msgstr ""
70+
71+
#. module: sale_order_line_input
72+
#: model:ir.model.fields,help:sale_order_line_input.field_sale_order_line_pricelist_id
73+
msgid "Pricelist for current sales order."
74+
msgstr ""
75+
76+
#. module: sale_order_line_input
77+
#: model:ir.model,name:sale_order_line_input.model_sale_order_line
78+
msgid "Sales Order Line"
79+
msgstr ""
80+
81+
#. module: sale_order_line_input
82+
#: model:ir.actions.act_window,name:sale_order_line_input.action_sales_order_line_input
83+
#: model:ir.ui.menu,name:sale_order_line_input.menu_sales_order_line_input
84+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
85+
msgid "Sales Orders Lines"
86+
msgstr ""
87+
88+
#. module: sale_order_line_input
89+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
90+
msgid "To Invoice"
91+
msgstr ""
92+
93+
#. module: sale_order_line_input
94+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_input_tree
95+
msgid "Total"
96+
msgstr ""
97+
98+
#. module: sale_order_line_input
99+
#: model:ir.ui.view,arch_db:sale_order_line_input.view_sales_order_line_filter
100+
msgid "UoM"
101+
msgstr ""
102+
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import sale_order
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright 2018 Tecnativa - Carlos Dauden
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
from odoo import api, fields, models
5+
6+
7+
class SaleOrderLine(models.Model):
8+
_inherit = 'sale.order.line'
9+
10+
pricelist_id = fields.Many2one(
11+
related='order_id.pricelist_id',
12+
readonly=True,
13+
)
14+
15+
@api.model
16+
def create(self, vals):
17+
if not vals.get('order_id', False):
18+
SaleOrder = self.env['sale.order']
19+
new_so = SaleOrder.new({
20+
'partner_id': vals.pop('order_partner_id'),
21+
})
22+
for onchange_method in new_so._onchange_methods['partner_id']:
23+
onchange_method(new_so)
24+
order_data = new_so._convert_to_write(new_so._cache)
25+
vals['order_id'] = SaleOrder.create(order_data).id
26+
return super().create(vals)
27+
28+
@api.multi
29+
def action_sale_order_form(self):
30+
self.ensure_one()
31+
action = self.env.ref('sale.action_orders')
32+
form = self.env.ref('sale.view_order_form')
33+
action = action.read()[0]
34+
action['views'] = [(form.id, 'form')]
35+
action['res_id'] = self.order_id.id
36+
return action
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* `Tecnativa <https://www.tecnativa.com>`_:
2+
3+
* Carlos Dauden
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
This module extends the functionality of sales to allow you to work with
2+
sale lines directly.
3+
4+
It allows you to create sales orders from this sales lines view.
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
To use this module, you need to:
2+
3+
#. Go to Sales > Orders > Sales Orders Lines
4+
#. You can filter, group and switch view type
5+
#. Create new line related with existant order
6+
#. If order field is empty, a new order will be created
Loading

0 commit comments

Comments
 (0)