Fix: Add field date, xmls
This commit is contained in:
		| @@ -6,6 +6,7 @@ from trytond.transaction import Transaction | |||||||
| from trytond.modules.currency.fields import Monetary | from trytond.modules.currency.fields import Monetary | ||||||
| from trytond.modules.product import price_digits | from trytond.modules.product import price_digits | ||||||
| from decimal import Decimal | from decimal import Decimal | ||||||
|  | from datetime import date | ||||||
|  |  | ||||||
|  |  | ||||||
| class SaleOrder(ModelView, ModelSQL): | class SaleOrder(ModelView, ModelSQL): | ||||||
| @@ -22,6 +23,11 @@ class SaleOrder(ModelView, ModelSQL): | |||||||
|     lines = fields.One2Many( |     lines = fields.One2Many( | ||||||
|         'order.line', 'order', 'Lines' |         'order.line', 'order', 'Lines' | ||||||
|     ) |     ) | ||||||
|  |     date = fields.Date("Date", required=True) | ||||||
|  |  | ||||||
|  |     @staticmethod | ||||||
|  |     def default_date(): | ||||||
|  |         return date.today() | ||||||
|  |  | ||||||
|  |  | ||||||
| class OrderLine(ModelView, ModelSQL): | class OrderLine(ModelView, ModelSQL): | ||||||
|   | |||||||
| @@ -23,5 +23,27 @@ this repository contains the full copyright notices and license terms. --> | |||||||
|       <field name="type">form</field> |       <field name="type">form</field> | ||||||
|       <field name="name">line_form</field> |       <field name="name">line_form</field> | ||||||
|     </record> |     </record> | ||||||
|  |     <record model="ir.action.act_window" id="act_sale_order"> | ||||||
|  |       <field name="name">Order</field> | ||||||
|  |       <field name="res_model">sale.order</field> | ||||||
|  |     </record> | ||||||
|  |     <record model="ir.action.act_window.view" | ||||||
|  | 	    id="act_sale_order_view1"> | ||||||
|  |       <field name="sequence" eval="1"/> | ||||||
|  |       <field name="view" ref="sale_order_view_tree"/> | ||||||
|  |       <field name="act_window" ref="act_sale_order"/> | ||||||
|  |     </record> | ||||||
|  |     <record model="ir.action.act_window.view" | ||||||
|  | 	    id="act_sale_order_view2"> | ||||||
|  |       <field name="sequence" eval="2"/> | ||||||
|  |       <field name="view" ref="sale_order_view_form"/> | ||||||
|  |       <field name="act_window" ref="act_sale_order"/> | ||||||
|  |     </record> | ||||||
|  |     <menuitem | ||||||
|  |       name="Order" | ||||||
|  |       action="act_sale_order" | ||||||
|  |       sequence="80" | ||||||
|  |       id="menu_order" | ||||||
|  |       icon="tryton-folder"/> | ||||||
|    </data> |    </data> | ||||||
| </tryton> | </tryton> | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| [tryton] | [tryton] | ||||||
| version=7.4 | version=7.4.0 | ||||||
| depends: | depends: | ||||||
|     ir |     ir | ||||||
|     party |     party | ||||||
|   | |||||||
| @@ -2,4 +2,12 @@ | |||||||
| <!-- This file is part of Tryton.  The COPYRIGHT file at the top level of | <!-- This file is part of Tryton.  The COPYRIGHT file at the top level of | ||||||
| this repository contains the full copyright notices and license terms. --> | this repository contains the full copyright notices and license terms. --> | ||||||
| <form> | <form> | ||||||
|  |     <group col="2" id="line"> | ||||||
|  |         <label name="product"/> | ||||||
|  |         <field name="product"/> | ||||||
|  |         <label name="quantity"/> | ||||||
|  |         <field name="quantity"/> | ||||||
|  |         <label name="total_amount"/> | ||||||
|  |         <field name="total_amount"/> | ||||||
|  |     </group> | ||||||
| </form> | </form> | ||||||
|   | |||||||
| @@ -2,4 +2,7 @@ | |||||||
| <!-- This file is part of Tryton.  The COPYRIGHT file at the top level of | <!-- This file is part of Tryton.  The COPYRIGHT file at the top level of | ||||||
| this repository contains the full copyright notices and license terms. --> | this repository contains the full copyright notices and license terms. --> | ||||||
| <tree> | <tree> | ||||||
| </tree> |     <field name="product"/> | ||||||
|  |     <field name="quantity"/> | ||||||
|  |     <field name="total_amount"/> | ||||||
|  | </tree> | ||||||
| @@ -6,9 +6,8 @@ this repository contains the full copyright notices and license terms. --> | |||||||
|   <field name="party"/> |   <field name="party"/> | ||||||
|   <label name="pickup_location"/> |   <label name="pickup_location"/> | ||||||
|   <field name="pickup_location"/> |   <field name="pickup_location"/> | ||||||
|   <notebook colspan="4"> |   <label name="date"/> | ||||||
|     <page string="Order Lines" col="1" id="line">  |   <field name="date"/> | ||||||
|       <field name=""/>      |   <field name="lines" colspan="4" | ||||||
|     </page>    |     view_ids="sale_order.order_line_view_tree,sale_order.order_line_view_form"/> | ||||||
|   </notebook> |  | ||||||
| </form> | </form> | ||||||
|   | |||||||
| @@ -2,6 +2,7 @@ | |||||||
| <!-- This file is part of Tryton.  The COPYRIGHT file at the top level of | <!-- This file is part of Tryton.  The COPYRIGHT file at the top level of | ||||||
| this repository contains the full copyright notices and license terms. --> | this repository contains the full copyright notices and license terms. --> | ||||||
| <tree keyword_open="1"> | <tree keyword_open="1"> | ||||||
|     <field name="party" expand="1"/> |     <field name="party"/> | ||||||
|     <field name="pickup_location" expand="1"/> |     <field name="pickup_location"/> | ||||||
|  |     <field name="date"/> | ||||||
| </tree> | </tree> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user