diff options
Diffstat (limited to 'indoteknik_custom/models')
| -rwxr-xr-x | indoteknik_custom/models/__init__.py | 1 | ||||
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 4 | ||||
| -rw-r--r-- | indoteknik_custom/models/website_ads.py | 18 |
3 files changed, 23 insertions, 0 deletions
diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index 8ada3b95..5d5ad0ec 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -44,3 +44,4 @@ from . import x_biaya_kirim from . import x_manufactures from . import x_partner_purchase_order from . import x_product_tags +from . import website_ads diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index c8937ca4..5a4a653b 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -197,11 +197,15 @@ class SaleOrder(models.Model): raise UserError("Payment Term pada Master Data Customer harus diisi") if not order.partner_id.parent_id.active_limit: raise UserError("Credit Limit pada Master Data Customer harus diisi") + if order.payment_term_id != order.partner_id.parent_id.property_payment_term_id: + raise UserError("Payment Term berbeda pada Master Data Customer") else: if not order.partner_id.property_payment_term_id: raise UserError("Payment Term pada Master Data Customer harus diisi") if not order.partner_id.active_limit: raise UserError("Credit Limit pada Master Data Customer harus diisi") + if order.payment_term_id != order.partner_id.property_payment_term_id: + raise UserError("Payment Term berbeda pada Master Data Customer") if not order.sales_tax_id: raise UserError("Tax di Header harus diisi") if not order.carrier_id: diff --git a/indoteknik_custom/models/website_ads.py b/indoteknik_custom/models/website_ads.py new file mode 100644 index 00000000..ec360294 --- /dev/null +++ b/indoteknik_custom/models/website_ads.py @@ -0,0 +1,18 @@ +from odoo import fields, models + + +class WebsiteAds(models.Model): + _name = 'website.ads' + + sequence = fields.Integer(string='Sequence') + name = fields.Char(string='Name') + image = fields.Binary(string='Image') + url = fields.Char(string='URL') + page = fields.Selection([ + ('product', 'Product'), + ('homepage', 'Home Page') + ], string='Page') + status = fields.Selection([ + ('tayang', 'Tayang'), + ('tidak_tayang', 'Tidak Tayang') + ], string='Status') |
