Пример #1
0
class DeliveryCarrierDatamodel(Datamodel):
    _name = "delivery.carrier"

    code = fields.Str(required=True)
    price_unit = fields.Decimal(required=True)
    discount = fields.Decimal()
    description = fields.Str()
Пример #2
0
class SaleOrderLineDatamodel(Datamodel):
    _name = "sale.order.line"

    product_code = fields.Str(required=True)
    qty = fields.Decimal(required=True)
    price_unit = fields.Decimal(required=True)
    description = fields.Str()
    discount = fields.Decimal()
Пример #3
0
class SaleOrderPaymentDatamodel(Datamodel):
    _name = "sale.order.payment"

    mode = fields.Str(required=True)
    amount = fields.Decimal(required=True)
    reference = fields.Str(required=True)
    currency_code = fields.Str(required=True)
    acquirer_reference = fields.Str()
Пример #4
0
class SaleOrderAddressDatamodel(Datamodel):
    _name = "sale.order.address"

    name = fields.Str(required=True)
    street = fields.Str(required=True)
    street2 = fields.Str(allow_none=True)
    zip = fields.Integer(required=True)
    city = fields.Str(required=True)
    email = fields.Email()
    state_code = fields.Str()
    country_code = fields.Str(required=True)
    phone = fields.Str()
    mobile = fields.Str()
Пример #5
0
class SaleOrderDatamodel(Datamodel):
    _name = "sale.order"

    name = fields.Str(required=True)
    address_customer = fields.NestedModel("sale.order.customer", required=True)
    address_shipping = fields.NestedModel("sale.order.address", required=True)
    address_invoicing = fields.NestedModel("sale.order.address", required=True)
    lines = fields.NestedModel("sale.order.line", many=True, required=True)
    amount = fields.NestedModel("sale.order.amount")
    invoice = fields.NestedModel("sale.order.invoice")
    payment = fields.NestedModel("sale.order.payment")
    pricelist_id = fields.Integer()
    date_order = fields.Date()
Пример #6
0
class AuthenticableSigninInput(Datamodel):
    _name = "authenticable.signin.input"

    login = fields.Str(required=True)
    password = fields.Str(required=True)
Пример #7
0
class AuthenticableSetPasswordInput(Datamodel):
    _name = "authenticable.set.password.input"

    token_set_password = fields.Str(required=True)
    password = fields.Str(required=True)
Пример #8
0
class AuthenticableForgetPasswordInput(Datamodel):
    _name = "authenticable.forget.password.input"

    login = fields.Str(required=True)
Пример #9
0
class SaleCancelInput(Datamodel):
    _name = "sale.cancel.input"

    sale_name = fields.Str()
Пример #10
0
class SaleOrderInvoiceDatamodel(Datamodel):
    _name = "sale.order.invoice"

    date = fields.Date(required=True)
    number = fields.Str(required=True)
Пример #11
0
class SaleOrderCustomerDatamodel(Datamodel):
    _inherit = "sale.order.address"
    _name = "sale.order.customer"

    external_id = fields.Str(required=True)