1
2
3
4
5
6
7
8
9
10
11
12
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')
|