diff --git a/sale_order.py b/sale_order.py index cc361bd..55cb201 100644 --- a/sale_order.py +++ b/sale_order.py @@ -6,6 +6,7 @@ from trytond.transaction import Transaction from trytond.modules.currency.fields import Monetary from trytond.modules.product import price_digits from decimal import Decimal +from datetime import date class SaleOrder(ModelView, ModelSQL): @@ -22,6 +23,11 @@ class SaleOrder(ModelView, ModelSQL): lines = fields.One2Many( 'order.line', 'order', 'Lines' ) + date = fields.Date("Date", required=True) + + @staticmethod + def default_date(): + return date.today() class OrderLine(ModelView, ModelSQL): diff --git a/sale_order.xml b/sale_order.xml index 961ff6b..ae2ddc0 100644 --- a/sale_order.xml +++ b/sale_order.xml @@ -23,5 +23,27 @@ this repository contains the full copyright notices and license terms. --> form line_form + + Order + sale.order + + + + + + + + + + + + diff --git a/tryton.cfg b/tryton.cfg index 7f44b41..cf9eb2d 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -1,5 +1,5 @@ [tryton] -version=7.4 +version=7.4.0 depends: ir party diff --git a/view/line_form.xml b/view/line_form.xml index 68843d4..1286d69 100644 --- a/view/line_form.xml +++ b/view/line_form.xml @@ -2,4 +2,12 @@
+ +
diff --git a/view/line_tree.xml b/view/line_tree.xml index 3b1cd8d..e1f0a85 100644 --- a/view/line_tree.xml +++ b/view/line_tree.xml @@ -2,4 +2,7 @@ - + + + + \ No newline at end of file diff --git a/view/order_form.xml b/view/order_form.xml index f228a57..062bf4b 100644 --- a/view/order_form.xml +++ b/view/order_form.xml @@ -6,9 +6,8 @@ this repository contains the full copyright notices and license terms. -->