diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-11-09 09:21:45 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-11-09 09:21:45 +0700 |
| commit | 27b2145a60fde081f7dd5555126e169d426904e9 (patch) | |
| tree | bd56ad9346db61983b5aa0f1d9964d2fca819fe3 | |
| parent | 019493c8e0e6cc5aff4c612eb332f1c882b0519d (diff) | |
mandatory source in sale order
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 2 | ||||
| -rwxr-xr-x | indoteknik_custom/views/sale_order.xml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index cc6941a9..dbc4e863 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -77,7 +77,7 @@ class SaleOrder(models.Model): voucher_id = fields.Many2one(comodel_name='voucher', string='Voucher', copy=False) applied_voucher_id = fields.Many2one(comodel_name='voucher', string='Applied Voucher', copy=False) amount_voucher_disc = fields.Float(string='Voucher Discount') - source_id = fields.Many2one('utm.source', 'Source', domain="[('id', 'in', [32, 59, 60, 61])]") + source_id = fields.Many2one('utm.source', 'Source', domain="[('id', 'in', [32, 59, 60, 61])]", required=True) estimated_arrival_days = fields.Integer('Estimated Arrival Days', default=0) email = fields.Char(string='Email') picking_iu_id = fields.Many2one('stock.picking', 'Picking IU') diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml index a260c68a..c6187f60 100755 --- a/indoteknik_custom/views/sale_order.xml +++ b/indoteknik_custom/views/sale_order.xml @@ -50,7 +50,7 @@ <field name="sppkp" attrs="{'invisible': [('customer_type','!=','pkp')], 'required': [('customer_type', '=', 'pkp')]}"/> <field name="email" required="1"/> <field name="due_id" readonly="1"/> - <field name="source_id" domain="[('id', 'in', [32, 59, 60, 61])]" attrs="{'required':[('create_date', '>', '2023-09-10')]}"/> + <field name="source_id" domain="[('id', 'in', [32, 59, 60, 61])]" required="1"/> </field> <field name="partner_shipping_id" position="after"> <field name="real_shipping_id"/> |
