diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-07-31 11:23:49 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-07-31 11:23:49 +0700 |
| commit | 2c4c5ef80fe7093c2d017802dd0713d460a5b1f7 (patch) | |
| tree | 31ff3456491f0321b50215daea84f5a1315cf450 | |
| parent | 771b68d8ece431c00e3d4b2c81be317b19ea3cba (diff) | |
fix source
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 1 | ||||
| -rwxr-xr-x | indoteknik_custom/views/sale_order.xml | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 12043996..3f25b100 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -89,6 +89,7 @@ class SaleOrder(models.Model): purchase_total = fields.Monetary(string='Purchase Total', compute='_compute_purchase_total') voucher_id = fields.Many2one(comodel_name='voucher', string='Voucher') amount_voucher_disc = fields.Float(string='Voucher Discount') + source_id = fields.Many2one('utm.source', 'Source') def _compute_purchase_total(self): for order in self: diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml index cd2b22c3..9bed5c89 100755 --- a/indoteknik_custom/views/sale_order.xml +++ b/indoteknik_custom/views/sale_order.xml @@ -41,7 +41,7 @@ <field name="carrier_id" required="1"/> <field name="delivery_service_type" readonly="1"/> </field> - <field name="medium_id" position="after"> + <field name="source_id" position="after"> <field name="date_doc_kirim" readonly="1"/> <field name="notification" readonly="1"/> </field> @@ -57,9 +57,7 @@ </attribute> </xpath> <field name="source_id" position="attributes"> - <attribute name="domain">[('id', 'in', [32, 59, 60, 61])]</attribute> - <attribute name="attrs">{'required':[('create_date', '>', '2023-08-30')]} - </attribute> + <attribute name="invisible">1</attribute> </field> <xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='price_total']" position="after"> <field name="vendor_id" attrs="{'readonly': [('parent.approval_status', '=', 'approved')]}"/> @@ -113,6 +111,7 @@ <field name="gross_amount" readonly="True"/> <field name="payment_type" readonly="True"/> <field name="payment_status" readonly="True"/> + <field name="source_id" domain="[('id', 'in', [32, 59, 60, 61])]" attrs="{'required':[('create_date', '>', '2023-09-10')]}"/> </group> </group> </page> |
