mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
IMP connector_walmart Add the ability to set the Salesperson on imported Walmart orders.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
{
|
||||
'name': 'Walmart Connector',
|
||||
'version': '12.0.1.0.0',
|
||||
'version': '12.0.1.1.0',
|
||||
'category': 'Connector',
|
||||
'depends': [
|
||||
'account',
|
||||
|
||||
@@ -123,6 +123,11 @@ class SaleOrderImportMapper(Component):
|
||||
if self.backend_record.team_id:
|
||||
return {'team_id': self.backend_record.team_id.id}
|
||||
|
||||
@mapping
|
||||
def user_id(self, record):
|
||||
if self.backend_record.user_id:
|
||||
return {'user_id': self.backend_record.user_id.id}
|
||||
|
||||
@mapping
|
||||
def payment_mode_id(self, record):
|
||||
assert self.backend_record.payment_mode_id, ("Payment mode must be specified.")
|
||||
|
||||
@@ -59,6 +59,8 @@ class WalmartBackend(models.Model):
|
||||
'field on the sale order created by the connector.'
|
||||
)
|
||||
team_id = fields.Many2one(comodel_name='crm.team', string='Sales Team')
|
||||
user_id = fields.Many2one(comodel_name='res.users', string='Salesperson',
|
||||
help="Default Salesperson for newly imported orders.")
|
||||
sale_prefix = fields.Char(
|
||||
string='Sale Prefix',
|
||||
help="A prefix put before the name of imported sales orders.\n"
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="fiscal_position_id"/>
|
||||
<field name="team_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="sale_prefix"/>
|
||||
<field name="payment_mode_id"/>
|
||||
<field name="acknowledge_order"/>
|
||||
|
||||
Reference in New Issue
Block a user