Skip to content

Commit

Permalink
[IMP] sale_report_delivered: Add partner salesperson to sales report …
Browse files Browse the repository at this point in the history
…from delivery orders

TT51908
  • Loading branch information
pilarvargas-tecnativa committed Nov 29, 2024
1 parent 0467405 commit 3aaa719
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
12 changes: 9 additions & 3 deletions sale_report_delivered/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-02-16 17:02+0000\n"
"PO-Revision-Date: 2022-02-16 18:13+0100\n"
"POT-Creation-Date: 2024-11-28 20:03+0000\n"
"PO-Revision-Date: 2024-11-28 21:03+0100\n"
"Last-Translator: Carlos Dauden <[email protected]>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.3\n"
"X-Generator: Poedit 3.4.2\n"

#. module: sale_report_delivered
#: model:ir.model.fields,field_description:sale_report_delivered.field_sale_report_delivered__nbr
Expand Down Expand Up @@ -232,6 +232,12 @@ msgstr "Ventas desde albaranes"
msgid "Salesperson"
msgstr "Comercial"

#. module: sale_report_delivered
#: model:ir.model.fields,field_description:sale_report_delivered.field_sale_report_delivered__user_from_partner_id
#: model_terms:ir.ui.view,arch_db:sale_report_delivered.view_sale_report_delivered_search
msgid "Salesperson From Partner"
msgstr "Comercial del cliente"

#. module: sale_report_delivered
#: model:ir.model.fields,field_description:sale_report_delivered.field_sale_report_delivered__source_id
msgid "Source"
Expand Down
8 changes: 8 additions & 0 deletions sale_report_delivered/i18n/sale_report_delivered.pot
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-28 20:03+0000\n"
"PO-Revision-Date: 2024-11-28 20:03+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -228,6 +230,12 @@ msgstr ""
msgid "Salesperson"
msgstr ""

#. module: sale_report_delivered
#: model:ir.model.fields,field_description:sale_report_delivered.field_sale_report_delivered__user_from_partner_id
#: model_terms:ir.ui.view,arch_db:sale_report_delivered.view_sale_report_delivered_search
msgid "Salesperson From Partner"
msgstr ""

#. module: sale_report_delivered
#: model:ir.model.fields,field_description:sale_report_delivered.field_sale_report_delivered__source_id
msgid "Source"
Expand Down
6 changes: 6 additions & 0 deletions sale_report_delivered/reports/sale_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class SaleReportDeliverd(models.Model):
product_uom_qty = fields.Float("Qty", readonly=True)
partner_id = fields.Many2one("res.partner", "Customer", readonly=True)
company_id = fields.Many2one("res.company", "Company", readonly=True)
user_from_partner_id = fields.Many2one(
"res.users", "Salesperson From Partner", readonly=True
)
user_id = fields.Many2one("res.users", "Salesperson", readonly=True)
price_subtotal = fields.Float("Untaxed total delivered", readonly=True)
product_tmpl_id = fields.Many2one("product.template", "Product", readonly=True)
Expand Down Expand Up @@ -71,6 +74,7 @@ def _select(self):
sub.date,
sub.state,
sub.partner_id,
sub.user_from_partner_id,
sub.user_id,
sub.company_id,
sub.campaign_id,
Expand Down Expand Up @@ -168,6 +172,7 @@ def _sub_select(self):
s.analytic_account_id as analytic_account_id,
s.team_id as team_id,
p.product_tmpl_id,
partner.user_id as user_from_partner_id,
partner.country_id as country_id,
partner.industry_id as industry_id,
partner.commercial_partner_id as commercial_partner_id,
Expand Down Expand Up @@ -253,6 +258,7 @@ def _group_by(self):
sub.order_name,
sub.date,
sub.partner_id,
sub.user_from_partner_id,
sub.user_id,
sub.state,
sub.company_id,
Expand Down
6 changes: 6 additions & 0 deletions sale_report_delivered/views/sale_report_delivered_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
/>
<separator />
<field name="user_id" />
<field name="user_from_partner_id" />
<field name="team_id" />
<field name="product_id" />
<field name="categ_id" />
Expand All @@ -71,6 +72,11 @@
name="User"
context="{'group_by':'user_id'}"
/>
<filter
string="Salesperson From Partner"
name="user_from_partner_id"
context="{'group_by':'user_from_partner_id'}"
/>
<filter
string="Sales Team"
name="sales_channel"
Expand Down

0 comments on commit 3aaa719

Please sign in to comment.