Feedback 1142: Fehler bei Rechnungsanlage
parent
9df9a9c31e
commit
45e9b0d76a
|
|
@ -18,7 +18,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
from odoo import api, fields, models, _
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class AccountInvoiceLine(models.Model):
|
||||
|
|
@ -29,6 +29,5 @@ class AccountInvoiceLine(models.Model):
|
|||
@api.model
|
||||
def create(self, vals):
|
||||
if vals.get('product_id', False) and not vals.get('intrastat_id', False):
|
||||
vals.update(intrastat_id=vals['product_id'].intrastat_id.id)
|
||||
vals.update(intrastat_id=self.env['product.template'].browse(vals['product_id']).intrastat_id.id)
|
||||
return super(AccountInvoiceLine, self).create(vals)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue