diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-11-15 08:53:28 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-11-15 08:53:28 +0700 |
| commit | 2861ba3cd7844079ce85ad31aa1470e95de7f71d (patch) | |
| tree | 093e2ef5846e960ca423e6e25ab434476690bab1 | |
| parent | a2fe5cf62932ee4f112fd2f126ca2ee29036046a (diff) | |
add table website user cart
| -rwxr-xr-x | indoteknik_custom/models/__init__.py | 1 | ||||
| -rw-r--r-- | indoteknik_custom/models/website_user_cart.py | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index 94fe56fe..21549684 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -29,3 +29,4 @@ from . import users from . import ir_attachment from . import delivery_carrier from . import dunning_run +from . import website_user_cart diff --git a/indoteknik_custom/models/website_user_cart.py b/indoteknik_custom/models/website_user_cart.py new file mode 100644 index 00000000..165170a9 --- /dev/null +++ b/indoteknik_custom/models/website_user_cart.py @@ -0,0 +1,13 @@ +from odoo import fields, models, api, _ +from odoo.exceptions import AccessError, UserError, ValidationError + + +class WebsiteUserCart(models.Model): + _name = 'website.user.cart' + user_id = fields.Many2one('res.users', string='User', help="User ID yang terdaftar di table res.users") + cart_type = fields.Selection([ + ('cart', 'Cart'), + ('wishlist', 'Wishlist'), + ], string='Cart Type', help="Type apakah Cart atau Wishlist") + product_id = fields.Many2one('product.product', string='Product', help="Product yang terdaftar di table product.product") + qty = fields.Float(string='Quantity', digits='Product Unit of Measure') |
